package com.fjnu.dao.impl;

import java.util.Locale;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.fjnu.dao.IInsDataArrange;
import com.fjnu.dao.common.BaseDao;
import com.fjnu.dao.common.BaseDaoImpl;
import com.fjnu.entities.MainInstrument;
@Repository("InsDataArrangeDao")
public class InsDataArrangeDao extends BaseDaoImpl<MainInstrument> implements IInsDataArrange {

	//形成校区标志
	public boolean BeingSchoolArea(MainInstrument mainInstrument) {
		
		String hql= "update MainInstrument m set m.schoolArea=? where id=?";
		Query query=getSession().createQuery(hql);
		query.setString(0, mainInstrument.getSchoolArea());
		query.setInteger(1, mainInstrument.getId());
		return (query.executeUpdate()>0);
	    
	}

}
